<?php
function db_connect($db) {
	$con=mysql_connect('localhost', 'root', '');
	if (!$con) {
		die('Could not connect to database server!!!');
	}
	if (!mysql_select_db($db, $con)) {
		die('Could not connect to database!!!');
	}
	return $con;
}
?>